﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace _20160627AJAX项目学习._03无刷新评论功能
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            //if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)  //判断是否是Repeater主体部分
            //{
            //    Label Label1 = (Label)e.Item.FindControl("Label1");     //查找页面Label1控件
            //    int hanghao = Convert.ToInt32(e.Item.ItemIndex);        //获得当前行的行号
            //    Label1.Text = Convert.ToString(hanghao + 1);            //将行号赋值给Label1控件渲染到页面
            //}
        }
    }
}